home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / MacHacksBug / Python 1.5.2c1 / Mac / IDE scripts / Widget demos / ListWindow.py < prev    next >
Encoding:
Text File  |  2000-06-23  |  364 b   |  18 lines

  1. import W
  2.  
  3. def listhit(isdbl):
  4.     if isdbl:
  5.         print "double-click in list!"
  6.     else:
  7.         print "click in list."
  8.  
  9. window = W.Window((200, 400), "Window with List", minsize = (150, 200))
  10.  
  11. window.list = W.List((-1, 20, 1, -14), [], listhit)
  12.  
  13. # or (equivalent):
  14. # window.list = W.List((-1, 20, 1, -14), callback = listhit)
  15.  
  16. window.list.set(range(13213, 13350))
  17. window.open()
  18.